/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isd.general.modelo;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author ctrosch
 */
@Entity
@Table(name = "grccbf")
@IdClass(GR_FormularioPorSituacionIVAPK.class)
public class GR_FormularioPorSituacionIVA implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "GRCCBF_MODCOM", nullable = false, length = 2)
    private String modcom;
    @Id
    @Column(name = "GRCCBF_CODCOM", nullable = false, length = 6)
    private String codcom;
    @Id
    @Column(name = "GRCCBF_CNDIVA", nullable = false, length = 6)
    private String cndiva;

     /**
     * Comprobante 
     */
    @JoinColumns({
    @JoinColumn(name = "GRCCBF_MODCOM", referencedColumnName = "GRCCBH_MODCOM", nullable = false,insertable=false, updatable=false),
    @JoinColumn(name = "GRCCBF_CODCOM", referencedColumnName = "GRCCBH_CODCOM", nullable = false,insertable=false, updatable=false)
    })
    @ManyToOne
    GR_Comprobante comprobante;


    /**
     * Formulario
     */
    @JoinColumns({
    @JoinColumn(name = "GRCCBF_MODFOR", referencedColumnName = "GRCFOR_MODFOR", nullable = false),
    @JoinColumn(name = "GRCCBF_CODFOR", referencedColumnName = "GRCFOR_CODFOR", nullable = false)
    })
    @ManyToOne
    GR_Formulario formulario;


    @Column(name = "GRCCBF_CLADGI", length = 6)
    private String cladgi;
    /**
     * Nombre del reporte
     */
    @Column(name = "GRCCBF_RPTNAM", length = 15)
    private String rptnam;
    @Column(name = "GRCCBF_MODFCR", length = 2)
    private String modfcr;
    @Column(name = "GRCCBF_CODFCR", length = 6)
    private String codfcr;
    @Column(name = "GRCCBF_MINFCR", precision = 18, scale = 2)
    private BigDecimal minfcr;    
    @Column(name = "GRCCBF_EMPFCR", length = 10)
    private String empfcr;
    @Column(name = "GRCCBF_EMPIVA", length = 10)
    private String empiva;

    @Embedded
    private GR_Auditoria auditoria;


    public GR_FormularioPorSituacionIVA() {
    }

    public GR_FormularioPorSituacionIVA(String modcom, String codcom, String cndiva) {
        this.modcom = modcom;
        this.codcom = codcom;
        this.cndiva = cndiva;
    }


    public GR_Comprobante getComprobante() {
        return comprobante;
    }

    public void setComprobante(GR_Comprobante comprobante) {
        this.comprobante = comprobante;
    }

    public GR_Formulario getFormulario() {
        return formulario;
    }

    public void setFormulario(GR_Formulario formulario) {
        this.formulario = formulario;
    }
    
    public GR_Auditoria getAuditoria() {
        return auditoria;
    }

    public void setAuditoria(GR_Auditoria auditoria) {
        this.auditoria = auditoria;
    }

    public String getCladgi() {
        return cladgi;
    }

    public void setCladgi(String cladgi) {
        this.cladgi = cladgi;
    }

    public String getCndiva() {
        return cndiva;
    }

    public void setCndiva(String cndiva) {
        this.cndiva = cndiva;
    }

    public String getCodcom() {
        return codcom;
    }

    public void setCodcom(String codcom) {
        this.codcom = codcom;
    }

    public String getCodfcr() {
        return codfcr;
    }

    public void setCodfcr(String codfcr) {
        this.codfcr = codfcr;
    }

    public String getEmpfcr() {
        return empfcr;
    }

    public void setEmpfcr(String empfcr) {
        this.empfcr = empfcr;
    }

    public String getEmpiva() {
        return empiva;
    }

    public void setEmpiva(String empiva) {
        this.empiva = empiva;
    }

    public BigDecimal getMinfcr() {
        return minfcr;
    }

    public void setMinfcr(BigDecimal minfcr) {
        this.minfcr = minfcr;
    }

    public String getModcom() {
        return modcom;
    }

    public void setModcom(String modcom) {
        this.modcom = modcom;
    }

    public String getModfcr() {
        return modfcr;
    }

    public void setModfcr(String modfcr) {
        this.modfcr = modfcr;
    }

    public String getRptnam() {
        return rptnam;
    }

    public void setRptnam(String rptnam) {
        this.rptnam = rptnam;
    }

    @Override
    public String toString() {
        return "GR_FormularioPorSituacionIVA{" + "modcom=" + modcom + "codcom=" + codcom + "cndiva=" + cndiva + '}';
    }





}
